//
//  WPUser.m
//  wobingwoyi
//
//  Created by WGP on 16/8/15.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPUser.h"

@implementation WPUser

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeInt64:_id forKey:@"id"];
    [aCoder encodeObject:_account forKey:@"account"];
    [aCoder encodeObject:_name forKey:@"name"];
    [aCoder encodeObject:_password forKey:@"password"];
    [aCoder encodeObject:_image forKey:@"image"];
    [aCoder encodeObject:_sex forKey:@"sex"];
    [aCoder encodeObject:_birthday forKey:@"birthday"];
    [aCoder encodeObject:_inviteCode forKey:@"inviteCode"];
    [aCoder encodeObject:_invitedCode forKey:@"invitedCode"];
    [aCoder encodeObject:_phone forKey:@"phone"];
    [aCoder encodeInt64:_registerTime forKey:@"registerTime"];
    
}
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    if(self = [super init])
    {
        _id = [aDecoder decodeInt64ForKey:@"id"];
        _account = [aDecoder decodeObjectForKey:@"account"];
        _name = [aDecoder decodeObjectForKey:@"name"];
        _password = [aDecoder decodeObjectForKey:@"password"];
        _image = [aDecoder decodeObjectForKey:@"image"];
        _sex = [aDecoder decodeObjectForKey:@"sex"];
        _birthday = [aDecoder decodeObjectForKey:@"birthday"];
        _inviteCode = [aDecoder decodeObjectForKey:@"inviteCode"];
        _invitedCode = [aDecoder decodeObjectForKey:@"invitedCode"];
        _phone = [aDecoder decodeObjectForKey:@"phone"];
        _registerTime = [aDecoder decodeInt64ForKey:@"registerTime"];
    }
    return self;
}

@end
